import request from '@/utils/request'

// 查询我的任务列表
export function listMyTeam(query) {
  return request({
    url: '/cooperate/team/myTeam',
    method: 'get',
    params: query
  })
}

// 查询我的任务详细
export function getMyTeam(id) {
  return request({
    url: '/cooperate/team/teamDetail/' + id,
    method: 'get'
  })
}

// 添加群组成员
export function addTeamUser(data) {
  return request({
    url: '/cooperate/team/addTeamUser',
    method: 'post',
    data: data
  })
}

// 创建群组
export function createTeam(data) {
  return request({
    url: '/cooperate/team/create',
    method: 'post',
    data: data
  })
}


// 移除群组成员
export function deleteTeamUser(data) {
  return request({
    url: '/cooperate/team/deleteTeamUser',
    method: 'post',
    data: data
  })
}

// 解散群组
export function disbandTeam(teamId) {
  return request({
    url: `/cooperate/team/disbandTeam/${teamId}`,
    method: 'post',
  })
}